from django.db import models

from utils.BaseModel import BaseModel


# Create your models here.
class Nav(BaseModel):
    name =models.CharField(max_length=30,unique=True)
    position=models.BooleanField()
    ishttp=models.BooleanField()
    url=models.CharField(max_length=150)
    class Meta:
        db_table='nav'
    def __str__(self):
        return self.name
class Banner(BaseModel):
    title=models.CharField(max_length=50)
    imurl=models.CharField(max_length=150)
    ishttp=models.BooleanField(default=False)
    url=models.CharField(max_length=150,null=True,blank=True,default=False)
    class Meta:
        db_table='banner'
        verbose_name='轮播图'
    def __str__(self):
        return self.title